Optimal. Leaf size=72 \[ -\frac{(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac{(2 a+b) \log (\cos (e+f x)+1)}{4 f}-\frac{\csc ^2(e+f x) (a+b \cos (e+f x))}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0626343, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {4138, 1814, 633, 31} \[ -\frac{(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac{(2 a+b) \log (\cos (e+f x)+1)}{4 f}-\frac{\csc ^2(e+f x) (a+b \cos (e+f x))}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 1814
Rule 633
Rule 31
Rubi steps
\begin{align*} \int \cot ^3(e+f x) \left (a+b \sec ^3(e+f x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^3}{\left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}+\frac{\operatorname{Subst}\left (\int \frac{-b+2 a x}{1-x^2} \, dx,x,\cos (e+f x)\right )}{2 f}\\ &=-\frac{(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}+\frac{(2 a-b) \operatorname{Subst}\left (\int \frac{1}{1-x} \, dx,x,\cos (e+f x)\right )}{4 f}+\frac{(2 a+b) \operatorname{Subst}\left (\int \frac{1}{-1-x} \, dx,x,\cos (e+f x)\right )}{4 f}\\ &=-\frac{(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}-\frac{(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac{(2 a+b) \log (1+\cos (e+f x))}{4 f}\\ \end{align*}
Mathematica [A] time = 1.09186, size = 114, normalized size = 1.58 \[ -\frac{a \left (\cot ^2(e+f x)+2 \log (\tan (e+f x))+2 \log (\cos (e+f x))\right )}{2 f}-\frac{b \csc ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b \sec ^2\left (\frac{1}{2} (e+f x)\right )}{8 f}+\frac{b \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{2 f}-\frac{b \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 69, normalized size = 1. \begin{align*} -{\frac{ \left ( \cot \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}-{\frac{a\ln \left ( \sin \left ( fx+e \right ) \right ) }{f}}-{\frac{b\csc \left ( fx+e \right ) \cot \left ( fx+e \right ) }{2\,f}}+{\frac{b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{2\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00388, size = 84, normalized size = 1.17 \begin{align*} -\frac{{\left (2 \, a + b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) +{\left (2 \, a - b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac{2 \,{\left (b \cos \left (f x + e\right ) + a\right )}}{\cos \left (f x + e\right )^{2} - 1}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.518424, size = 254, normalized size = 3.53 \begin{align*} \frac{2 \, b \cos \left (f x + e\right ) -{\left ({\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} - 2 \, a - b\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) -{\left ({\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, a + b\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 2 \, a}{4 \,{\left (f \cos \left (f x + e\right )^{2} - f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.41699, size = 244, normalized size = 3.39 \begin{align*} \frac{8 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 2 \,{\left (2 \, a - b\right )} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) + \frac{{\left (a + b + \frac{4 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{2 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}}{\cos \left (f x + e\right ) - 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]